#ifndef SURFACEOBJECT
#define SURFACEOBJECT

#include "Ray.h"
#include "Vector3.h"
#include "Matrix4.h"
#include "SurfaceShader.h"
#include "Material.h"
#include <string>

class SurfaceObject {
    public:
        virtual bool Intersects(Ray, Vector3&) = 0;
        virtual Vector3 GetNormal(Vector3) = 0;
        Matrix4 GetObjectOrientation();
        void SetPosition(Vector3 v) { _position = v; }
        void SetScale(float s) { _scale = s; }
        void SetRotation(Vector3 v) { _rotation = v; }
        virtual float DistanceToPointPow2(Vector3) = 0;
        virtual Ray Refract(Ray, Vector3, float) = 0;
        virtual Vector3 GetRandomPositionInObject() = 0;
        Vector3 GetPosition() { return _position; }
        SurfaceShader * _sh;
        Material * _material;
        void printName();
        std::string _name;
    protected:
        Vector3 _position;
        Vector3 _rotation;
        float _scale;
        void InitObject(const char *);
};

#endif


